﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GraphicsFramework.Property
{
    public class TextProperty
    {
        private string font;
        private float size;
        private bool bold;
        private bool italic;
        private bool strikeout;
        private bool underline;
        private bool updated;

        public TextProperty()
        {
            this.font = "Arial";
            this.size = 10;

            this.bold = false;
            this.italic = false;
            this.underline = false;
            this.strikeout = false;
            this.updated = true;   
        }

        public TextProperty(string fontname, float size)
        {
            this.font = fontname;
            this.size = size;

            this.bold = false;
            this.italic = false;
            this.underline = false;
            this.strikeout = false;
            this.updated = true;
        }

        public TextProperty Clone()
        {
            TextProperty prop = new TextProperty(font, size);
            prop.bold = bold;
            prop.italic = italic;
            prop.underline = underline;
            prop.strikeout = strikeout;

            return prop;
        }

        public bool Updated
        {
            get { return updated; }
            set { updated = value; }
        }

        public string Font
        {
            get { return font; }
            set { font = value; updated = true; }
        }

        public float Size
        {
            get { return size; }
            set { size = value; updated = true; }
        }

        public bool Bold
        {
            get { return bold; }
            set { bold = value; updated = true; }
        }

        public bool Italic
        {
            get { return italic; }
            set { italic = value; updated = true; }
        }

        public bool StrikeOut
        {
            get { return strikeout; }
            set { strikeout = value; updated = true; }
        }

        public bool Underline
        {
            get { return underline; }
            set { underline = value; updated = true; }
        }

    }
}
